package main.java.cn.wolfcode.service.impl;

import cn.wolfcode.domain.Consumption;
import cn.wolfcode.mapper.ConsumptionReportMapper;
import cn.wolfcode.qo.ConsumptionReportQueryObject;
import cn.wolfcode.service.IConsumptionReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author liuquan
 * @program: car-business
 * @description:
 * @date 2021-01-17 18:49:46
 */
@Service
public class ConsumptionReportServiceImpl implements IConsumptionReportService {
    @Autowired
    private ConsumptionReportMapper consumptionReportMapper;
    @Override
    public PageInfo<HashMap> query(ConsumptionReportQueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<HashMap> hashMaps = consumptionReportMapper.selectConsumptionReport(qo);
        return new PageInfo<>(hashMaps);
    }
}
